package com.hxx.service;

import com.hxx.domain.TUser;
import com.hxx.mapper.UserMapper;
import com.hxx.mapper.UserMapperImpl;

import java.util.List;

public class UserServiceImpl implements UserService{

    private UserMapper userMapper = new UserMapperImpl();
    @Override
    public void save(TUser user) {
        userMapper.save(user);
    }

    @Override
    public TUser findById(int id) {
        return userMapper.findById(id);
    }

    @Override
    public void update(TUser user) {
        userMapper.update(user);
    }

    @Override
    public void delete(int id) {
        userMapper.delete(id);
    }

    @Override
    public List<TUser> findAll() {
        return userMapper.findAll();
    }
}
